const userDao = require('../dao/userDao');

//分页查询
module.exports.find = async function (searchObj, page) {
    console.log("userDao",searchObj, page);
    return await userDao.find(searchObj, page);
}
//查询所有
module.exports.findAll=async function(){
    return await userDao.findAll();
}
// 登录查询是否存在
module.exports.usernameExist=async function(username){
    console.log("username",username);
    return await userDao.findByUsername(username)
}
// 增加
module.exports.insert = async function(user){
    return await userDao.insert(user);
}
// id查找
module.exports.findById = async function(id){
    return await userDao.findById(id);
}
// 修改
module.exports.update = async function(user){
    return await userDao.update(user);
}
// 删除
module.exports.remove = async function(id){
    return await userDao.remove(id);
}
